PMIC: MAX77686: fix invalid bus check
authorJeroen Hofstee <[email protected]>
Wed, 18 Jun 2014 20:13:52 +0000 (22:13 +0200)
committerMinkyu Kang <[email protected]>
Mon, 23 Jun 2014 01:04:13 +0000 (10:04 +0900)
commit00d4796c555b95e986b4a01a9322d49f64c1349f
treed867afd85c7e3da13d89a2453518c43a2ec742ff
parent0cf7e18904f245d0ba7a5ed85ed48bea386258d4
PMIC: MAX77686: fix invalid bus check

Since p->bus is unsigned checking for negative values
is optimized away. Since bus is already used as an argument
use tmp. While at it, don't declare variables in the middle
of a function.

cc: Rajeshwari Shinde <[email protected]>
Signed-off-by: Jeroen Hofstee <[email protected]>
Signed-off-by: Minkyu Kang <[email protected]>
drivers/power/pmic/pmic_max77686.c